package main

import "fmt"

func main() {
	// fatal error: all goroutines are asleep - deadlock!
	//ch := make(chan int)
	//ch <- 10
	//fmt.Println("send success")

	ch := make(chan int)
	go recv(ch)
	ch <- 10
	fmt.Println("send success")
}

func recv(c chan int) {
	ret := <-c
	fmt.Println("recv success", ret)
}
